/**
 * @file 订单详情-百度地图
 * @author sunlife
 * @date 2020/08/17 19:03:40
 */

layui.define(['layer', 'form', 'NP', 'laytpl', 'table', 'zmnUtils', 'Vue', '$http'], function (exports) {
    let $ = layui.$;
    let form = layui.form;
    let table = layui.table;
    let NP = layui.NP;
    let opCommonUtils = layui.list_modify_common;
    let $http = layui.$http;
    let zmnUtils = layui.zmnUtils;
    let Vue = layui.Vue;


    /**
     * 分润详情
     */
    var SharingDetailModal = (function () {
        function creatSharingDetailComponent(sharingEstimateDetail) {
            Vue.filter('fenToYuan', function (value) {
                return zmnUtils.unit.fenToYuan(value || 0);
            });


            var AccountDetail = {
                data: function () {
                    return {
                        sharingEstimateDetail
                    }
                },
                template: '#template-detailsubmodule-detail'
            };

            return AccountDetail;
        }

        function OpenSharingDetailModal() {
            var sharingDetail = creatSharingDetailComponent(sharingEstimateDetail);

            new Vue({
                el: '#sharing-detail',
                components: {
                    'sharing-detail': sharingDetail,
                },
                methods: {
                    handleConfirmClick: function () {
                    }
                },
                template: `<sharing-detail @account="handleConfirmClick"></sharing-detail>`
            });
        }

        return {
            open: OpenSharingDetailModal
        }
    })();


    /**
     * 初始化页面
     */
    function initPage () {
        SharingDetailModal.open();
    }

    /**
     * 初始化页面事件
     */
    function initEvent () {
        // 地图关闭按钮点击事件
    }

    /**
     * 程序入口
     */
    function init () {
        initPage();
        initEvent();
    }

    init();
    exports('oms_work_detailsubmodule');
});




